package com.ruoyi.pos.config;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Configuration;

/**
 * Mapper扫描配置
 * 
 * 分别扫描不同数据源对应的Mapper接口
 * 
 * @author POS System
 * @since 1.0.0
 */
@Configuration
public class MapperScanConfig {

    /**
     * 扫描POS系统Mapper
     * 对应主数据源
     */
    @MapperScan(basePackages = "com.ruoyi.pos.mapper.pos", 
                sqlSessionFactoryRef = "posSqlSessionFactory")
    public static class PosMapperScan {
    }

    /**
     * 扫描会员系统Mapper
     * 对应会员数据源
     */
    @MapperScan(basePackages = "com.ruoyi.pos.mapper.member", 
                sqlSessionFactoryRef = "memberSqlSessionFactory")
    public static class MemberMapperScan {
    }

    /**
     * 扫描商品系统Mapper
     * 对应商品数据源
     */
    @MapperScan(basePackages = "com.ruoyi.pos.mapper.goods", 
                sqlSessionFactoryRef = "goodsSqlSessionFactory")
    public static class GoodsMapperScan {
    }
}
